package com.czk.service;

import com.czk.domain.MsgAgreement;
import com.czk.redis.Publisher;
import com.czk.redis.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/4/29 11:35
 */
@Component
public class ExtServerService {
    @Autowired
    private Publisher publisher;
    @Autowired
    private RedisUtil redisUtil;

    public void push(MsgAgreement msgAgreement) {
        publisher.pushMessage("itstack-demo-netty-push-msgAgreement", msgAgreement);
    }

    public RedisUtil getRedisUtil() {
        return redisUtil;
    }
}
